<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:t="http://myfaces.apache.org/tomahawk">  

    <ui:composition template="/templates/layout.xhtml">
        <ui:define name="content">            
            <div class="block">
                <div class="navbar navbar-inner block-header">
                    <div class="muted pull-left"> <t:outputText value="#{courseManageBean.course.courseName}"/></div>
                </div>
                <div class="block-content collapse in">

                    <div class="form-horizontal">
                        <div class="span12">
                            <fieldset>
                                <legend><h:outputText value="Chi phí"/></legend>
                            </fieldset>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtCourseID"><h:outputText value="Mã Lớp Học:"/> </label>
                            <div class="controls">
                                <h:inputText styleClass="span1" id="txtCourseID" disabled="true" value="#{creditMemoEntity.courseID}"/>

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtCourseName"><h:outputText value="Tên Lớp Học:"/> </label>
                            <div class="controls">
                                <h:inputText styleClass="span3" id="txtCourseName" disabled="true" value="#{courseManageBean.course.courseName}" />
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="creditType"><h:outputText value="Loại:"/><i class="icon-headphones"></i> </label>
                            <div class="controls">
                                <t:selectOneMenu value="#{creditMemoEntity.creditType}" id="creditType">
                                    <f:selectItem itemValue="D" itemLabel="Chi" />
                                    <f:selectItem itemValue="C" itemLabel="Thu" />
                                </t:selectOneMenu>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="txtAmount"> <h:outputText value="Số Tiền: "/> <i class="icon-envelope"></i></label>
                            <div class="controls">
                                <h:inputText styleClass="span3" id="txtAmount"  value="#{creditMemoEntity.amount}"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtReason"> <h:outputText value="Lý Do: "/> <i class="icon-envelope"></i></label>
                            <div class="controls">
                                <h:inputTextarea styleClass="span7" id="txtReason"  value="#{creditMemoEntity.reason}"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtCreationOn"> <h:outputText value="Ngày Tạo: "/> <i class="icon-envelope"></i></label>
                            <div class="controls">
                                <h:inputText styleClass="span3" id="txtCreationOn" disabled="true" value="#{creditMemoEntity.createdDate}">
                                    <f:convertDateTime pattern="dd/MM/yyyy"/>
                                </h:inputText>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtLastModification"> <h:outputText value="Ngày Sửa: "/> <i class="icon-envelope"></i></label>
                            <div class="controls">
                                <h:inputText styleClass="span3" id="txtLastModification" disabled="true" value="#{creditMemoEntity.lastModifiedDate}">
                                    <f:convertDateTime pattern="dd/MM/yyyy"/>
                                </h:inputText>
                            </div>
                        </div>
                        <div class="form-actions">
                            <t:commandLink action="#{courseManageBean.updateCreditMemo}" styleClass="btn btn-primary">Save changes</t:commandLink>
                            <button type="reset" class="btn">Cancel</button>
                        </div>
                    </div>

                </div>
            </div>
        </ui:define>
    </ui:composition>        

</html>  